package com.eshore.norm.pojo.po;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author HJ
 * @date 2024/1/10 8:50
 */
@NoArgsConstructor
@Data
public class NormServersDetailPO {
    @JsonProperty("message")
    private String message;
    @JsonProperty("content")
    private List<ContentDTO> content;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("total")
    private Integer total;
    @JsonProperty("timestamp")
    private String timestamp;

    @NoArgsConstructor
    @Data
    public static class ContentDTO {
        @JsonProperty("servers")
        private List<ServersDTO> servers;

        // FIXME generate failure  field _$OsextendedvolumesVolumesAttached189
        @NoArgsConstructor
        @Data
        public static class ServersDTO {
            @JsonProperty("tenant_id")
            private String tenantId;
            @JsonProperty("addresses")
            private AddressesDTO addresses;
            @JsonProperty("locked_reason")
            private Object lockedReason;
            @JsonProperty("metadata")
            private MetadataDTO metadata;
            @JsonProperty("OS-EXT-STS:task_state")
            private Object taskState97;// FIXME check this code
            @JsonProperty("description")
            private Object description;
            @JsonProperty("OS-EXT-SRV-ATTR:hostname")
            private Object hostname237;// FIXME check this code
            @JsonProperty("OS-DCF:diskConfig")
            private String diskConfig10;// FIXME check this code
            @JsonProperty("trusted_image_certificates")
            private Object trustedImageCertificates;
            @JsonProperty("OS-EXT-AZ:availability_zone")
            private String availabilityZone;// FIXME check this code
            @JsonProperty("OS-EXT-STS:power_state")
            private Integer powerState;// FIXME check this code
            @JsonProperty("links")
            private List<LinksDTO> links;
            @JsonProperty("id")
            private String id;
            @JsonProperty("locked")
            private Boolean locked;
            @JsonProperty("OS-EXT-SRV-ATTR:kernel_id")
            private Object kernelId50;// FIXME check this code
            @JsonProperty("OS-EXT-SRV-ATTR:host")
            private String host143;// FIXME check this code
            @JsonProperty("OS-EXT-SRV-ATTR:ramdisk_id")
            private Object ramdiskId72;// FIXME check this code
            @JsonProperty("OS-SRV-USG:terminated_at")
            private Object terminatedAt297;// FIXME check this code
            @JsonProperty("accessIPv4")
            private String accessIPv4;
            @JsonProperty("image")
            private ImageDTO image;
            @JsonProperty("accessIPv6")
            private String accessIPv6;
            @JsonProperty("OS-EXT-SRV-ATTR:launch_index")
            private Integer launchIndex304;// FIXME check this code
            @JsonProperty("created")
            private String created;
            @JsonProperty("OS-EXT-SRV-ATTR:user_data")
            private Object userData309;// FIXME check this code
            @JsonProperty("fault")
            private Object fault;
            @JsonProperty("hostId")
            private String hostId;
            @JsonProperty("OS-EXT-SRV-ATTR:reservation_id")
            private Object reservationId;// FIXME check this code
            @JsonProperty("OS-EXT-SRV-ATTR:root_device_name")
            private Object rootDeviceName;// FIXME check this code
            @JsonProperty("OS-EXT-SRV-ATTR:hypervisor_hostname")
            private String hypervisorHostname;// FIXME check this code
            @JsonProperty("host_status")
            private Object hostStatus;
            @JsonProperty("tags")
            private Object tags;
            @JsonProperty("flavor")
            private List<FlavorDTO> flavor;
            @JsonProperty("key_name")
            private Object keyName;
            @JsonProperty("security_groups")
            private List<SecurityGroupsDTO> securityGroups;
            @JsonProperty("config_drive")
            private String configDrive;
            @JsonProperty("OS-EXT-STS:vm_state")
            private String _$OsextstsVmState248;// FIXME check this code
            @JsonProperty("OS-EXT-SRV-ATTR:instance_name")
            private String _$OsextsrvattrInstanceName244;// FIXME check this code
            @JsonProperty("user_id")
            private String userId;
            @JsonProperty("name")
            private String name;
            @JsonProperty("progress")
            private Integer progress;
            @JsonProperty("OS-SRV-USG:launched_at")
            private String _$OssrvusgLaunchedAt251;// FIXME check this code
            @JsonProperty("updated")
            private String updated;
            @JsonProperty("status")
            private String status;

            @NoArgsConstructor
            @Data
            public static class AddressesDTO {
                @JsonProperty("subnet-917c")
                private List<Subnet917cDTO> subnet917c;

                @NoArgsConstructor
                @Data
                public static class Subnet917cDTO {
                    @JsonProperty("OS-EXT-IPS-MAC:mac_addr")
                    private String _$OsextipsmacMacAddr146;// FIXME check this code
                    @JsonProperty("OS-EXT-IPS:type")
                    private String _$OSEXTIPSType155;// FIXME check this code
                    @JsonProperty("addr")
                    private String addr;
                    @JsonProperty("version")
                    private Integer version;
                }
            }

            @NoArgsConstructor
            @Data
            public static class MetadataDTO {
                @JsonProperty("productId")
                private String productId;
                @JsonProperty("hw_watchdog_action")
                private String hwWatchdogAction;
                @JsonProperty("server_expiry")
                private String serverExpiry;
                @JsonProperty("_ha_policy_type")
                private String haPolicyType;
                @JsonProperty("cascaded.instance_extrainfo")
                private String _$CascadedInstanceExtrainfo322;// FIXME check this code
            }

            @NoArgsConstructor
            @Data
            public static class ImageDTO {
                @JsonProperty("links")
                private List<LinksDTO> links;
                @JsonProperty("id")
                private String id;

                @NoArgsConstructor
                @Data
                public static class LinksDTO {
                    @JsonProperty("rel")
                    private String rel;
                    @JsonProperty("href")
                    private String href;
                }
            }

            @NoArgsConstructor
            @Data
            public static class LinksDTO {
                @JsonProperty("rel")
                private String rel;
                @JsonProperty("href")
                private String href;
            }

            @NoArgsConstructor
            @Data
            public static class Osextendedvolumes{
                    @JsonProperty("delete_on_termination")
                    private Boolean deleteOnTermination;
                    @JsonProperty("id")
                    private String id;
            }

            @NoArgsConstructor
            @Data
            public static class FlavorDTO {
                @JsonProperty("disk")
                private Integer disk;
                @JsonProperty("swap")
                private Integer swap;
                @JsonProperty("original_name")
                private Object originalName;
                @JsonProperty("extra_specs")
                private Object extraSpecs;
                @JsonProperty("ephemeral")
                private Integer ephemeral;
                @JsonProperty("links")
                private List<LinksDTO> links;
                @JsonProperty("id")
                private String id;
                @JsonProperty("vcpus")
                private Integer vcpus;
                @JsonProperty("ram")
                private Integer ram;

                @NoArgsConstructor
                @Data
                public static class LinksDTO {
                    @JsonProperty("rel")
                    private String rel;
                    @JsonProperty("href")
                    private String href;
                }
            }

            @NoArgsConstructor
            @Data
            public static class SecurityGroupsDTO {
                @JsonProperty("name")
                private String name;
            }
        }
    }


//
//    @JsonProperty("content")
//    private List<ContentDTO> content;
//
//
//    @NoArgsConstructor
//    @Data
//    public static class ContentDTO {
//        @JsonProperty("servers")
//        private List<ServersDTO> servers;
//    }
//
//
//    @NoArgsConstructor
//    @Data
//    public static class ServersDTO {
//        @JsonProperty("OS-DCF:diskConfig")
//        private String diskConfig;
//        @JsonProperty("OS-EXT-AZ:availability_zone")
//        private String availabilityZone;
//        @JsonProperty("OS-EXT-SRV-ATTR:host")
//        private String host;
//        @JsonProperty("OS-EXT-SRV-ATTR:hostname")
//        private String hostname;
//        @JsonProperty("OS-EXT-SRV-ATTR:hypervisor_hostname")
//        private String hypervisorHostname;
//        @JsonProperty("OS-EXT-SRV-ATTR:instance_name")
//        private String instanceName;
//        @JsonProperty("OS-EXT-SRV-ATTR:kernel_id")
//        private String kernelId;
//        @JsonProperty("OS-EXT-SRV-ATTR:launch_index")
//        private Integer launchIndex;
//        @JsonProperty("OS-EXT-SRV-ATTR:ramdisk_id")
//        private String ramdiskId;
//        @JsonProperty("OS-EXT-SRV-ATTR:reservation_id")
//        private String reservationId;
//        @JsonProperty("OS-EXT-SRV-ATTR:root_device_name")
//        private String rootDeviceName;
//        @JsonProperty("OS-EXT-SRV-ATTR:user_data")
//        private String userData;
//        @JsonProperty("OS-EXT-STS:power_state")
//        private Integer powerState;
//        @JsonProperty("OS-EXT-STS:vm_state")
//        private String vmState;
//        @JsonProperty("OS-SRV-USG:launched_at")
//        private String launchedAt;
//        @JsonProperty("accessIPv4")
//        private String accessIPv4;
//        @JsonProperty("accessIPv6")
//        private String accessIPv6;
//        //        @JsonProperty("addresses")
////        private Map<String,AddressesDTO> addresses;
//        @JsonProperty("config_drive")
//        private String configDrive;
//        @JsonProperty("created")
//        private String created;
//        @JsonProperty("description")
//        private String description;
//        @JsonProperty("flavor")
//        private FlavorDTO flavor;
//        @JsonProperty("hostId")
//        private String hostId;
//        @JsonProperty("host_status")
//        private String hostStatus;
//        @JsonProperty("id")
//        private String id;
//        @JsonProperty("image")
//        private ImageDTO image;
//        @JsonProperty("key_name")
//        private String keyName;
//        @JsonProperty("links")
//        private List<LinksDTO> links;
//        @JsonProperty("locked")
//        private Boolean locked;
//        @JsonProperty("locked_reason")
//        private String lockedReason;
//
//        @JsonProperty("name")
//        private String name;
//        @JsonProperty("os-extended-volumes:volumes_attached")
//        private List<volumesAttachedDTO> volumesAttached;
//        @JsonProperty("progress")
//        private Integer progress;
//        @JsonProperty("security_groups")
//        private List<SecurityGroupsDTO> securityGroups;
//        @JsonProperty("status")
//        private String status;
//        @JsonProperty("tenant_id")
//        private String tenantId;
//        @JsonProperty("updated")
//        private String updated;
//        @JsonProperty("user_id")
//        private String userId;
//
//        @NoArgsConstructor
//        @Data
//        public static class volumesAttachedDTO{
//            @JsonProperty("delete_on_termination")
//            private Boolean deleteOnTermination;
//            @JsonProperty("id")
//            private String id;
//        }
//
//        @NoArgsConstructor
//        @Data
//        public static class AddressesDTO {
//            @JsonProperty("OS-EXT-IPS-MAC:mac_addr")
//            private String macAddr;
//            @JsonProperty("OS-EXT-IPS:type")
//            private String type;
//            @JsonProperty("addr")
//            private String addr;
//            @JsonProperty("version")
//            private Integer version;
//        }
//
//        @NoArgsConstructor
//        @Data
//        public static class FlavorDTO {
//            @JsonProperty("disk")
//            private Integer disk;
//            @JsonProperty("ephemeral")
//            private Integer ephemeral;
//            @JsonProperty("extra_specs")
//            private ExtraSpecsDTO extraSpecs;
//            @JsonProperty("original_name")
//            private String originalName;
//            @JsonProperty("ram")
//            private Integer ram;
//            @JsonProperty("swap")
//            private Integer swap;
//            @JsonProperty("vcpus")
//            private Integer vcpus;
//            @JsonProperty("id")
//            private String id;
//
//            @NoArgsConstructor
//            @Data
//            public static class ExtraSpecsDTO {
//            }
//        }
//
//        @NoArgsConstructor
//        @Data
//        public static class ImageDTO {
//            @JsonProperty("id")
//            private String id;
//            @JsonProperty("links")
//            private List<LinksDTO> links;
//
//            @NoArgsConstructor
//            @Data
//            public static class LinksDTO {
//                @JsonProperty("href")
//                private String href;
//                @JsonProperty("rel")
//                private String rel;
//            }
//        }
//
//
//        @NoArgsConstructor
//        @Data
//        public static class LinksDTO {
//            @JsonProperty("href")
//            private String href;
//            @JsonProperty("rel")
//            private String rel;
//        }
//
//        @NoArgsConstructor
//        @Data
//        public static class SecurityGroupsDTO {
//            @JsonProperty("name")
//            private String name;
//        }
//    }
}
